package com.group.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.group.entity.wms.GoodsEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface GoodsMapper extends BaseMapper<GoodsEntity> {
    //查找所有商品信息

    List<GoodsEntity> findAll(Integer page,Integer size);

    GoodsEntity findById(@Param("goodsId") Long goodsId);

    /**
     * 根据条件查找数据
     * @param goodsEntity
     * @return
     */
    List<GoodsEntity> findByCondition(GoodsEntity goodsEntity);


    List<GoodsEntity> findByPosition(@Param("positionId") Long positionId,@Param("page") Integer page,
                                     @Param("size") Integer size);


    List<GoodsEntity> findByGoodsNameLike(@Param("keyWorld") String keyWorld);


    Long getTotalCount();

}
